home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / atari / birkhahn-metafont-packed-disks / mf27-2_2e-disk2.zoo / inputs / pandora.lzs / PNR10.MF < prev    next >
Text File  |  1991-06-14  |  12KB  |  200 lines

  1. %*****************************************************************************
  2. %        Copyright (c) 1989 by N. N. Billawala
  3. %*****************************************************************************
  4.  
  5.  
  6. % pnr10.mf   Pandora 10 point
  7. font_identifier:="PNR";
  8.  
  9. mode_setup;                             % general setup
  10. input pandor                            % general definitions used in pandora
  11.  
  12. designsize:= 10pt#;                     % intended "ideal" size for parameters
  13. width#:=     10pt#;                     % width of an em
  14. maxheight#:= 7.75pt#;                   % max height for delimiters,e.g., [,{,(
  15. ascender#:=  7.5pt#;                    % height of ascenders, e.g., on l,h,k
  16. cap#:=       7pt#;                      % height of uppercase, e.g., B,H,L
  17. xheight#:=   5pt#;                      % xheight of lowercase, e.g., x,n,o
  18. descender#:= 2pt#;                      % depth of descenders, e.g., on j,p,q
  19. maxdepth#:=  2.25pt#;                   % max depth for delimiters,e.g., [,{,(
  20. math_axis#:= .5[maxheight#,-maxdepth#]; % vertical alignment for math 
  21.  
  22. accent_height#:=.3(ascender#-xheight#); % places bottom of accents 
  23. accent_depth#:=min(.5xheight#,.7(ascender#-xheight#)); % character ref box depth
  24.  
  25. define_whole_vertical_pixels(width,maxheight,ascender,cap,xheight,descender,
  26.   maxdepth,math_axis,accent_depth);
  27.  
  28. fixed_pitch_characters(false)(0);       % true/false, # of characters per inch
  29. oblique:=0;                             % slant of character reference points
  30.  
  31. bowlstem.uc#:=1.05    *fixed_pt;        % uppercase (uc) bowl width
  32. bowlstem.lc#:=1       *fixed_pt;        % lowercase (lc) bowl width
  33. stem.uc#:=1           *fixed_pt;        % uppercase stem width
  34. stem.lc#:=.95         *fixed_pt;        % lowercase stem width
  35. thin_stem.uc#:=.62    *fixed_pt;        % width of thin uppercase stems
  36. thin_stem.lc#:=.6     *fixed_pt;        % width of thin lowercase stems
  37. define_pixels
  38.   (bowlstem.uc,bowlstem.lc,stem.uc,stem.lc,thin_stem.uc,thin_stem.lc);
  39.  
  40. boldness:=1;
  41. makeknown(fitbasis.lc#)(.21*width#);
  42. makeknown(fitbasis.uc#)(.30*width#);
  43.  
  44. apex.uc:=inlimit(.3stem.uc)(0,stem.uc); % apex flatness in uppercase
  45. apex.lc:=inlimit(.3stem.lc)(0,stem.lc); % apex flatness in lowercase
  46. ov_t.uc:=.02cap;                        % top curve overshoot for uppercase
  47. ov_t.lc:=.02xheight;                    % top curve overshoot for lowercase
  48. ov_b.uc:=.02cap;                        % bottom curve overshoot for uppercase
  49. ov_b.lc:=.02xheight;                    % bottom curve overshoot for lowercase
  50. ov_apex.uc:=.02cap;                     % apex overshoot for uppercase
  51. ov_apex.lc:=.02xheight;                 % apex overshoot for lowercase   
  52. apex_angle:=oblique;                    % for changing the angle at apex 
  53. if xheight<25:lowres_fix(ov_t.lc,ov_b.lc,ov_apex.lc); fi
  54. if cap<70:lowres_fix(ov_t.uc,ov_b.uc,ov_apex.uc); fi
  55.  
  56.                                         % for SERIFS and ARMS
  57. serif_thickness:=inlimit(.3stem.lc)(eps,.5xheight); % base thickness of h-serifs
  58. terminal_thickness:=serif_thickness;    % base thickness of terminal serifs
  59. tip_thickness:=     serif_thickness;    % base thickness of arms
  60. bulb_thickness:=  2*serif_thickness;    % (base) thickness of bulbs
  61. x_bracket_h:=inlimit(.2xheight)(serif_thickness,.5xheight); % lc bracket join
  62. cap_bracket_h:=inlimit(.2cap)(serif_thickness,.5cap);       % uc bracket join
  63. bool(ctrls):=false;                     % for explicit placement of control pts
  64. onbase:=inlimit(0)(0,1);                % places control pt along base of serif
  65. onstem:=inlimit(0)(0,1);                % places control pt along stem of serif
  66. midbracket_pull:=    inlimit(.4)(0,1);  % pulls brackets in on arms and serifs
  67. entasis:=            inlimit(.1)(0,1);  % amount of arc in horizontal serif base
  68. terminal_entasis:=   inlimit(.1)(0,1);  % amount of arc in terminal serif base
  69. arm_angle:=          inlimit(10)(0,60); % global angle off of 90 degrees
  70. asc_terminal_angle:= inlimit(0)(0,60);  % at ascender height: from 0 deg...h,k,l
  71. x_terminal_angle:=   inlimit(20)(0,60); % at x-height: from 0 deg...m,n,r
  72. base_terminal_angle:=inlimit(0)(0,60);  % at base line: from 0 deg...u
  73. diag_terminal_angle:=inlimit(10)(0,60); % on diagonals: from 0 deg...k,v,w,y
  74. hs:=pt;                                 % global horizontal serif length
  75. ts:=pt;                                 % global terminal serif length
  76. as:=pt;                                 % global arm length
  77. cs:=pt;                                 % global curvedarm length
  78. serif_constant_amt:=0pt;                % adds same length amount to all serifs
  79. bool(bulbs):=true;                      % arms become bulbs if true
  80. bool(bulb_taper):=false;                % changes bulbs to tapering shape
  81. taper_angle:=if bulb_taper:10 else:0 fi;% if bulb_taper, adjusts angle at end
  82. bulb_taper_amt:=0;                      % taper length as a % of limb thickness
  83. c_and_s.lc:=0;                          % c,s bulb length if bulb_taper=true
  84. c_and_s.uc:=0;                          % C,G,S bulb length if bulb_taper=true
  85. terminal_softness:=.2stem.lc;           % softness in heel of the terminal serif
  86. arm_softness:=.2thin_stem.lc;           % softness in the heel of the arm
  87.  
  88.                                         % ARCHES
  89. arch_thickness.uc:=.2[thin_stem.uc,stem.uc]; % uppercase arch thickness
  90. arch_thickness.lc:=.2[thin_stem.lc,stem.lc]; % lowercase arch thickness
  91. arch_tip.uc:=.5arch_thickness.uc;       % thinnest part of the uc arch
  92. arch_tip.lc:=.5arch_thickness.lc;       % thinnest part of the lc arch
  93. arch_reference:=inlimit(.7)(.4,.95);    % puts ref pts between tip/stem
  94. arch_inner_amt:=inlimit(.8)(.4,.95);    % puts arch pts between tip/ref pts
  95. r_arch:=l_arch:=inlimit(.6)(0,1);       % y-value of max outer stress on r_arch
  96. bool(ensure_min_archthickness):=true;   % guarantees minimum thickness
  97.  
  98.                                         % BOWLS
  99. major_curve.uc:=.9arch_thickness.uc;    % uppercase major bowl curve thickness
  100. major_curve.lc:=.9arch_thickness.lc;    % lowercase major bowl curve thickness
  101. minor_curve.uc:=.85arch_thickness.uc;   % uppercase minor bowl curve thickness
  102. minor_curve.lc:=.85arch_thickness.lc;   % lowercase minor bowl curve thickness
  103. major_bowl_tip.lc:=.9arch_tip.lc;       % lowercase major bowl tip thickness
  104. minor_bowl_tip.lc:=.8arch_tip.lc;       % lowercase minor bowl tip thickness
  105. major_bowl_reference:=inlimit(.6)(.4,.95); % puts ref pts between tip/bowlstem
  106. minor_bowl_reference:=inlimit(.5)(.4,.95); % puts ref pts between tip/bowlstem
  107. major_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts 
  108. minor_bowl_inner_amt:=inlimit(.7)(.4,.95); % puts arch pts between tip/ref pts
  109.  
  110. define_minimums(                        % these values keep a one pixel minimum
  111.   bowlstem.lc,stem.lc,thin_stem.lc,apex.lc,arch_thickness.lc,arch_tip.lc,
  112.   bowlstem.uc,stem.uc,thin_stem.uc,apex.uc,arch_thickness.uc,arch_tip.uc,
  113.   major_curve.lc,minor_curve.lc,major_bowl_tip.lc,minor_bowl_tip.lc,
  114.   major_curve.uc,minor_curve.uc);
  115.  
  116.                                         % ARCHES and BOWLS and CIRCULAR SHAPES
  117. v_stress:=.52;                          % places point of vert stress on bowl
  118. h_stress:=.51;                          % places horzstress on circular shapes
  119. ductal:=inlimit(.1)(0,1);               % for more ductal strokes: value of 1
  120. minor_ductal.lc:=.1*(xheight-minor_curve.lc-major_curve.lc); % minor curve join
  121. circ1:=inlimit(.95)(.75,1.5);           % tension of outer curve shapes
  122. circ2:=inlimit(.95)(.75,1.5);           % tension of inner curve shapes
  123. circ3:=inlimit(.95)(.75,1.5);           % tension of outer circular_shapes
  124.                          
  125.                                         % JUNCTURES and NOTCHES
  126. bool(softjuncture):=false;              % are junctures soft? in junct macro
  127. juncture_opening:=inlimit(.05stem.lc)(0,stem.lc);% indent into stem at juncture
  128. stemcut_angle:=-2;                      % cut into stem at angle off of 90
  129. archcut_angle:=0;                       % cuts into regular arch path
  130. notch_length.uc:=.05stem.uc;            % length of corrective notching (uc)
  131. notch_length.lc:=.05stem.lc;            % length of corrective notching (lc)
  132. notch_width:=1;                         % width of corrective notching in pixels
  133. notch_pos:=.3;                          % positions the beginning of the notch
  134. bool(center_notch):=                    % centers all notches
  135.  if(thin_stem.lc/stem.lc)>=.75:true else:false fi;
  136. bool(nonotch):=if(xheight<15)           % if real low resolution
  137.  or(xheight#>15pt#)                     % or large character size
  138.  or(thin_stem.uc/stem.uc<.5):true       % or small thin/thick ratio
  139.  else:false fi;                         %   this overrides notching
  140.  
  141.                                         % PUNCTUATION, ACCENTS, MATH and PENS
  142. round_dot_diameter:=1.1stem.uc;         % diameter of dots on ;:    
  143. accent_dot_diameter:=stem.lc;           % diameter of dots(!?") and dot accents
  144. comma_dot_indent:=inlimit(.25)(0,1);    % indent in the comma macro for the dot 
  145. bool(prime):=false;                     % changes commas to prime 
  146. prime_angle:=-20;                       % angle of prime-like comma
  147. bool(realsoft_accents):=true;           % make accents soft as possible
  148. accent_thin_end:=max(1,.5thin_stem.lc); % thinnest end of accents
  149. accent_thick_end:=max(1,.75stem.lc);    % thickest end of accents
  150. mathlines:=max(1,.45pt);                % thickness of lines in math characters
  151. head_thickness:=max(1,.9mathlines);     % arrowhead thickness
  152. def mathpen=pensquare scaled mathlines enddef;              % for []/=+#%-\<>_|^
  153. blank_space_thickness:=max(1,.7mathlines);                  % for space char
  154. def slashpen=pensquare scaled max(1,.5thin_stem.lc) enddef; % in O-slash chars
  155. def dashpen=pensquare scaled max(1,.75mathlines) enddef;    % for en em
  156.  
  157.                                         % MISCELLANEOUS
  158. join_radius:=.1pt;                      % global softness for use with softjoin
  159. bool(softpath):=true;                   % softens paths in macros
  160. narrow_amt:=inlimit(.7)(0,1);           % thins strokes if narrow condition=true
  161. w_narrow_amt:=inlimit(.3)(0,1);         % thins strokes especially for eMwW oe
  162. ebar_angle:=0;                          % used on the lowercase e
  163. bool(bold):=false;                      % changes accent shapes if bold
  164.  
  165. rulepen:=pensquare scaled 1;            % makes screenrules 1 pixel thick
  166. if oblique=0:let //=relax               % lets // do nothing if needed otherwise
  167.   else:def //=slanted(sind oblique/cosd oblique) enddef fi; % // slants ref pts
  168. pair upward,downward; 
  169.  upward=dir(90-oblique);                % "up" along oblique angle
  170.  downward=dir(-90-oblique);             % "down" along oblique angle
  171.  
  172.                                         % ALTERNATE character specs
  173. bool(test_all_characters):=false;       % allows testing of alternate characters
  174.  alt0:=0; bool(a_full_bowl):=false;     % for half/double bowls on a
  175.  alt1:=0; bool(g_full_bowl):=false;     % for half/double bowls on g
  176.  alt2:=0; bool(spur):=true;             % for pronged terminals on G,a,b,g,q
  177.  alt3:=0; bool(like_lowercase):=false;  % alternate U
  178.  alt4:=0; bool(flat_diagonal_endings):=true; % else teminalserif k,v,w,x,y,V,W,X
  179.  alt5:=0; bool(beveled_join):=false;    % on R,K,k
  180.  alt6:=0; bool(open_tail):=false;       % for 3,5,6,9
  181.  alt7:=0; bool(diagonal_three):=false;  % for diagonal as opposed to round top 3
  182.  alt8:=0; bool(inflection_two):=true;   % for 2 with inflection
  183.  alt9:=0; bool(G_spur):=true;           % spur on G
  184.  alt10:=0;bool(open_four):=true;        % for top of 4 
  185.  
  186. extra_beginchar:=extra_beginchar&"save t,p,ref; path p[],p[]',ref[];";
  187. extra_beginchar:=extra_beginchar&"w#:=charwd;";          % for adjust def
  188. extra_endchar:=extra_endchar&"wsaved:=w; w:=r-l;";       % for adjust def
  189.  
  190. for x:="n":
  191.  wanted[byte x]:=true; endfor           % test these characters
  192. let iff=always_iff;                     % tests all chars in the file
  193.   let show_character=draw_outlines; 
  194.   if mode<>proof:let show_character=fill_all;fi
  195.  
  196. input rotext                            % Roman Text character set
  197.  
  198.         
  199.  
  200.